<?php if (!defined('THINK_PATH')) exit();?>
	

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title></title>
		<link rel="stylesheet" href="Public/css/swiper.min.css" />
		<link rel="stylesheet" href="Public/css/goodDetail.css" />
		<link rel="stylesheet" href="Public/css/api.css" />
	</head>
	<body>
		<div id="DetailContainer">
			<!-- 轮播图-->
			<div class="header" id="slide">		    
			    <div class="swiper-container" id="swiper-container">
				    <div class="swiper-wrapper">
						
						<?php if(is_array($images)): $i = 0; $__LIST__ = $images;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$image): $mod = ($i % 2 );++$i;?><div  class="swiper-slide" data-hash="slide2" ><img src=<?php echo ($image); ?> /></div><?php endforeach; endif; else: echo "" ;endif; ?>
				    </div>
				    <div class="swiper-pagination" id="swiper-pagination"></div>
			    </div>
		    </div>
		    
		    <div class="wrap">
		    	<div class="goods_info">
			    	<p class="goodsName" ><?php echo ($detailObj["name"]); ?></p>
			    	<?php if($detailObj["state"] == 2): ?><div>
							<div class="get_prize">
							    <img src="<?php echo ($detailObj["pic_headimg"]); ?>"/>
							    <div class="get_prize_content">
							       <p>获得者:<span style="color:#c365f9;" ><?php echo ($detailObj["luckname"]); ?></span></p>
							       <p>期号:<span ><?php echo ($detailObj["fk_number"]); ?></span></p>
							       <p>本期参与:<span class="appcolor_tx"><?php echo ($detailObj["quantity"]); ?></span>人次</p>
							       <p>揭晓时间:<span ng-bind="publictime"><?php echo ($detailObj["publictime"]); ?></span></p>
							    </div>
							    
							</div>
							<p class="xinyun">幸运号码: <span style="font-size:18px" ><?php echo ($detailObj["luck_number"]); ?></span></p>
						</div>
					<?php elseif($detailObj["state"] == 0 and $detailObj["canbuy"] == 0): ?>
					    <div>
							<p style="font-size:11px;">期号:<span><?php echo ($detailObj["fk_number"]); ?></span></p>
							<div class="progress"><span></span></div>
							<p style="font-size:11px;overflow: hidden;"><span style="float:left">总需:<span ><?php echo ($detailObj["headcount"]); ?></span>人次</span><span style="float:right;">剩余<span style="color:#58a3eb"><?php echo ($detailObj["remaining"]); ?></span></span></p>
						</div>
						
						<p class="no_part">您没有参与本次夺宝哦  !</p>
					<?php else: endif; ?>
			    	
			    	
				</div>
		    </div>
		    
		    <!-- 方式一-->
		    <?php if($detailObj["canbuy"] == 1 and $detailObj["state"] == 0): ?><div class="fangshi_one appcolor_bc">
				    <span class="title appcolor_bg">方式1</span>
				    
				    <div class="content" >
				       <p>全价购买</p>
				       <p>无需等待,直接获得商品！</p>
				       <p class="appcolor_tx">￥<?php echo ($detailObj["price"]); ?></p>
				    </div>
				    
				    <span class="buy_button appcolor_bg" onclick="openC(<?php echo ($detailObj["fk_goodsid"]); ?>)">全价购买</span>
				</div>
			
				<!-- 方式二-->
				<div class="fangshi_two appcolor_bc">
				    <span class="title appcolor_bg">方式2</span>
				    
				    <div class="content" >
				       <div class="content_left">
					       <p style="font-size:16px;color:#000;">惊喜夺宝</p>
					       <p style="font-size:12px;">只需要1元就有机会获得商品!</p>
					       <p style="margin-top:15px;font-size:11px;"><?php echo ($detailObj["fk_number"]); ?>期</p>
					       <div class="progress"><span ng-style="detailObject.progress"}}></span></div>
					       <p style="overflow: hidden;font-size:11px;"><span style="float: left;">总需:<span ><?php echo ($detailObj["headcount"]); ?></span>人次</span><span style="float: right;color:#58a3eb;">剩余:<?php echo ($detailObj["remaining"]); ?></span></p>
					       <p class="appcolor_tx" style="font-size:11px;"><span ><?php echo ($detailObj["customize"]); ?></span>夺宝币/人次</p>
				       </div>
				      
			           <span class="toubao_bt appcolor_bg" style="position:absolute;bottom:70px;right:20px;width:28%;color:#fff;" ng-click="gohome(detailObject.fknumber)">立即夺宝</span>
			           <span class="toubao_bt appcolor_bc appcolor_tx" style="background:#fff;border:1px solid;position:absolute;bottom:20px;right:20px;width:28%;" ng-click="addCart(detailObject.fknumber)">加入清单</span>
				       
				    </div>
				    
				    
				</div><?php endif; ?>
		    <!--商品展示等-->
			<div class="goods_show">
				
				<div id="wangqi-jiexiao" >往期揭晓<i></i></div>
				<div id="shaidan">晒单分享<i></i></div>
				<div id="xiangqing" ng-click="openX()">图文详情<span style="font-size:12px;color:#999999">(建议在wifi下查看)</span><i></i></div>
			</div>
			
			<div class="buy_record">
		    	<p id="mytitle">所有参与记录<span style="font-size:12px;color:#999999">(自2016-08-31 20:12:09开始)</span></p>
		    	<ul>
		    		<li>
		    			<span class="time">2016-09-18</span>
		    			<span class="line"></span>
		    		</li>
		    		<div id="buyListContainer">
			    		
		    		</div>
		    		
		    	</ul>
		    	<div class="js-load-more">正在加载更多...</div>
		    </div>
	    
	        <div class="bt_ct">
	        	<span>立即购买</span>
	        	<span>加入清单</span>
	        </div>
	    </div>
	    <script type="text/javascript" src="Public/js/jquery-2.1.0.js" ></script>
	    <script type="text/javascript" src="Public/js/loadmore.js" ></script>
	    <script type="text/javascript" src="Public/js/swiper.min.js" ></script>
	    
	
	    <script type="text/javascript" src="Public/js/common.js" ></script>
	    <script type="text/javascript" src="Public/js/model/Detail.js" ></script>
	    <script>
	       var fk_number  = "<?php echo ($detailObj['fk_number']); ?>";
	       var goodsid = "<?php echo ($detailObj['fk_goodsid']); ?>";
	       var $swiper_container = document.getElementById('swiper-container');
           $swiper_container.style.height=window.innerWidth*(9/16)+'px';
	       var mySwiper = new Swiper('.swiper-container',{
			    pagination: '.swiper-pagination',
			    loop:true,
			    grabCursor: true,
			    paginationClickable: true,
			   
			});
			
			function openC(goodid){
				window.location.href="?c=index&a=comfirm&goodid="+goodid;
			}
	    </script>
	</body>
</html>